import { JSONMapping } from "./json-mapping";

export class JsonMappingUtil {

  static MappingAllProp(fromObject, toObject) {
    const dtoMapping = JSONMapping.generatePropertyKeyToJSONkeyMap(toObject);
    for (let key of Object.keys(dtoMapping)) {
      if (fromObject.hasOwnProperty(key)) {
        toObject[key] = fromObject[key];
      }
    }
    return toObject;
  }




}
